package com.tceasy.gateway.domain;

import com.tceasy.orm.annotation.Id;
import com.tceasy.orm.annotation.Sdb;

import java.io.Serializable;
import java.util.Date;
import java.util.Map;

/**
 * Created by zhanghuan on 2016/4/10.
 * 请求和响应日志
 */
@Sdb(space = "openapi",collection = "archiveLog")
public class OpenArchiveLog implements Serializable{
    private static final long serialVersionUID = 1L;
    @Id
    String _id;
    String requestId;/*每次请求的消息Id*/
    String remoteIp;/*客户端请求Ip*/
    Map<String,Object> request;/*请求*/
    Map<String,Object> response;/*响应*/
    Date startDate;/*开始处理时间*/
    Date endDate;/*结束处理时间*/
    long processTime;/*请求处理时长，单位毫秒*/

    public OpenArchiveLog() {
    }

    public OpenArchiveLog(Map request, Map response) {
        this.request = request;
        this.response = response;
    }

    public Map getRequest() {
        return request;
    }

    public void setRequest(Map request) {
        this.request = request;
    }

    public Map getResponse() {
        return response;
    }

    public void setResponse(Map response) {
        this.response = response;
    }

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    public long getProcessTime() {
        return processTime;
    }

    public void setProcessTime(long processTime) {
        this.processTime = processTime;
    }

    public String getRemoteIp() {
        return remoteIp;
    }

    public void setRemoteIp(String remoteIp) {
        this.remoteIp = remoteIp;
    }

    public String get_id() {
        return _id;
    }

    public void set_id(String _id) {
        this._id = _id;
    }
}
